#!/bin/bash
mysql --user=root --password=kiet server1 << EOF
CREATE TABLE users (
  un varchar(13) NOT NULL PRIMARY KEY,
  pw text NOT NULL,
  phone varchar(10),
  email text,
  otppref char(1),
  is2fa char(1),
  isia char(1),
  hdvid text
);

CREATE TABLE 2fa (
  sha1un char(40) PRIMARY KEY,
  code char(40) DEFAULT NULL,
  KEY code (code)
);
EOF
exit 0;
